#pragma once

class CameraManager
{
	enum Mode
	{
		Mode_Free,
		Mode_Track
	};
public:
	CameraManager(void);
	~CameraManager(void);
	bool frameStarted(const Ogre::FrameEvent& evt);
	bool mouseMoved(const OIS::MouseEvent &arg);
	bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
	bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
	bool keyPressed(const OIS::KeyEvent& e);
	bool keyReleased(const OIS::KeyEvent& e);
	void setCamera(Ogre::Camera* pCam);
	void setCameraMode(Mode mode);
protected:
	void setMouseState(OIS::MouseButtonID id, bool isPressed);
	void setKeyState(const OIS::KeyEvent& e, bool isPressed);
	Ogre::Camera* m_pCam;
	Mode m_mode;
	bool m_bRightPressed;
	bool m_bLeftPressed;
	bool m_bMoveRight;
	bool m_bMoveLeft;
	bool m_bMoveUp;
	bool m_bMoveDown;
	bool m_bMoveForward;
	bool m_bMoveBack;
	float m_fMoveSpeed;
};
